Authenticate User for Embedding with Window Authentication

{ authenticateUserEmbedWindows }

Generates a Pyramid access authentication token for embedding using Windows Authentication tokens

Method

/API3/authentication/authenticateUserEmbedWindows

  • API Section: /API3/authentication
  • API Version: 3.0
  • From Release: 2023.10
  • Usage: REST API and Client SDK libraries. REST APIs via POST actions only.
  • Usage by:
    • Enterprise Admin
    • Domain Admin
    • Pro
    • Analyst
    • Viewer
    • Basic
  • Input Parameters

    Name

    domain

    Type

    string

    Description

    The URL web domain - needed only for embedded authentication.

    Output Response

    Successful Result Code

    200

    Response Type

    string

    Description of Response Type

    The response is the security token as a base64 string. It is usually stored in a cookie.

    Notes

    The security token is a string that needs to be added to a cookie on the third party host page for any embedded content to ensure the access is authorized. The web browser must support Windows Authentication and the authentication METHOD must be set to 'Windows Authentication' in Pyramid. Currently, this entry is not supported in the Pyramid SDK's outside of the REST and C# flavours.

    Examples

    Code Snippets

    TypeScript
    Curl
    Java
    C#
    Python
    PHP
    curl -X POST \
     -H "Accept: text/plain,text/plain;charset=utf-8" \
     -H "Content-Type: application/json" \
     "http://Your.Server.URL/API3/authentication/authenticateUserEmbedWindows" \
     -d ''
    
    import com.pyramidanalytics.*;
    import com.pyramidanalytics.auth.*;
    import com.pyramidanalytics.model.*;
    import com.pyramidanalytics.api.AuthenticationServiceApi;
    
    import java.util.*;
    import java.time.*;
    
    public class AuthenticationServiceApiExample {
        public static void main(String[] args) {
            ApiClient defaultClient = Configuration.getDefaultApiClient();
            defaultClient.setBasePath("http://Your.Server.URL/");
    
            // Create an instance of the API class
            AuthenticationServiceApi apiInstance = new AuthenticationServiceApi();
            // Initialize the domain parameter object for the call
            String domain = domain_example; // Create the input object for the operation, type: String 
    
            try {
                String result = apiInstance.authenticateUserEmbedWindows(domain);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling AuthenticationServiceApi#authenticateUserEmbedWindows");
                e.printStackTrace();
            }
        }
    }
    
    import * as PyramidAnalyticsWebApi from "com.pyramidanalytics";
    
    // Create an instance of the API class
    const api = new PyramidAnalyticsWebApi.AuthenticationServiceApi("http://Your.Server.URL")
    
    const domain = domain_example; // {String} 
    
    api.authenticateUserEmbedWindows(domain).then(function(data) {
      console.log('API called successfully. Returned data: ' + data);
    }, function(error) {
      console.error(error);
    });
    
    
    using System;
    using System.Diagnostics;
    using PyramidAnalytics.Sdk.Api;
    using PyramidAnalytics.Sdk.Client;
    using PyramidAnalytics.Sdk.Model;
    
    public class authenticateUserEmbedWindowsExample
    {
        public static void Main()
        {
            Configuration conf = new Configuration();
            conf.BasePath = "http://Your.Server.URL/";
            conf.UseDefaultCredentials = true; // allow sending windows credentials in the request
            
            GlobalConfiguration.Instance = conf;
            
            // Create an instance of the API class
            var apiInstance = new AuthenticationServiceApi();
            // Initialize the domain parameter object for the call
            var domain = domain_example;  // Create the input object for the operation, type: String | 
    
            try {
                // Generates a Pyramid access authentication token for embedding using Windows Authentication tokens
                string result = apiInstance.authenticateUserEmbedWindows(domain);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AuthenticationServiceApi.authenticateUserEmbedWindows: " + e.Message );
            }
        }
    }
    
    
    import com.pyramidanalytics
    from com.pyramidanalytics import ApiException
    from com.pyramidanalytics import AuthenticationServiceApi
    from pprint import pprint
    
        api_config = com.pyramidanalytics.Configuration(host = 'http://Your.Server.URL')
    
    with com.pyramidanalytics.ApiClient(api_config) as api_client:
        # Create an instance of the API class
        api_instance = AuthenticationServiceApi(api_client)
        # Initialize the domain parameter object for the call
        domain = domain_example # String | 
    
        try:
            # Generates a Pyramid access authentication token for embedding using Windows Authentication tokens
            api_response = api_instance.authenticate_user_embed_windows(domain)
            pprint(api_response)
        except ApiException as e:
            print("Exception when calling AuthenticationServiceApi->authenticateUserEmbedWindows: %s\n" % e)
    <?php
    require_once(__DIR__ . '/vendor/autoload.php');
    
    OpenAPITools\Client\Configuration::getDefaultConfiguration()->setHost('http://Your.Server.URL');
    
    // Create an instance of the API class
    $api_instance = new OpenAPITools\Client\Api\AuthenticationServiceApi();
    $domain = domain_example; // String | 
    
    try {
        $result = $api_instance->authenticateUserEmbedWindows($domain);
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling AuthenticationServiceApi->authenticateUserEmbedWindows: ', $e->getMessage(), PHP_EOL;
    }
    ?>